﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HotelManagement._04.OBJECT;
using HotelManagement._03.DAO;
using System.Data;
namespace HotelManagement._02.BUS
{
    class ReservationBUS
    {
        ReservationDAO m_ReservationDAO = new ReservationDAO();
        public DataTable ViewReservation()
        {
            return m_ReservationDAO.ViewReservation("pr_tblReservation_SelectAll");
        }
        public DataTable tblRoom_SelectAll()
        {
            return m_ReservationDAO.tblRoom_SelectAll("pr_tblRoom_SelectAll");
        }
        public DataTable tblRoom_SelectRoomUnUse()
        {
            return m_ReservationDAO.tblRoom_SelectAll("pr_tblRoom_SelectRoomUnUse");
        }
        public DataTable tblUser_SelectAll()
        {
            return m_ReservationDAO.tblUser_SelectAll("pr_tblUser_SelectAll");
        }
        public bool tblReservation_DeleteRow(int id)
        {
            return m_ReservationDAO.tblReservation_DeleteRow(id, "pr_tblReservation_DeleteRow");
        }
        public bool tblRoom_ChangeStatus(string id, string status)
        {
            return m_ReservationDAO.tblRoom_ChangeStatus(id, status, "pr_tblRoom_ChangeStatus");
        }
        public bool tblReservation_Update(Reservation data)
        {
            return m_ReservationDAO.tblReservation_Update(data, "pr_tblReservation_Update");
        }
        public bool tblReservation_Insert(Reservation data)
        {
            return m_ReservationDAO.tblReservation_Insert(data, "pr_tblReservation_Insert");
        }
        public DataTable SearchCustomer(string ip_CustomerName)
        {
            return m_ReservationDAO.SearchCustomer(ip_CustomerName, "pr_tblCustomer_SearchCustomerByName");
        }

        public DataTable CheckRevervation(string ip_RoomID)
        {
            return m_ReservationDAO.CheckRevervation(ip_RoomID, "pr_tblReservation_CheckRevervation");
        }

        public DataTable ViewInfoCustomer(int ip_CustomerID)
        {
            return m_ReservationDAO.ViewInfoCustomer(ip_CustomerID, "pr_tblCustomer_SelectRow");
        }

        public DataTable CheckRevervationUpdate(string ip_RoomID, int ip_ReservationID)
        {
            return m_ReservationDAO.CheckRevervationUpdate(ip_RoomID, ip_ReservationID, "pr_tblReservation_CheckRevervationUpdate");
        }
    }
}
